home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
201-225
/
disk_220
/
dnet
/
doc
/
backup.doc
next >
Wrap
Text File
|
1992-05-06
|
14KB
|
387 lines
BACKUP.DOC
V2.02
16 November 1988
(c)Copyright 1988, Matthew Dillon, All Rights Reserved
Freely Distributable for non-profit only
(I)
OVERVIEW
Backup and Restore (same executable, just renamed) allow you to backup
any directory tree with optional compression, and later extract all
or part of the tree. The protection, date, and file comment is saved
with each file.
SEE SECTION (6), FLOPICAL BACKUP, for options pertaining to backing
up directly to floppies.
LIMITATIONS: When using -c (compress), the entire result of the
compressed file must fit into memory. Any files (after compression,
if any) larger than a floppy when backing up to floppies cannot be
handled yet.
(I)
INSTALLATION
Copy the (1) executable to your C: directory twice, naming one
'Backup' and the other 'Restore'. The program looks at the first
character of its name to determine whether the default is to backup
or restore. If you don't have the space, all is not lost ... you
simply need to specify backup or restore explicitly with the options
(-b or -r).
(2)
EXOTIC FEATURES
Backup does not write directory trees which contain no files. Thus,
when doing incremental backups on a large hard disk, the structure of
directory sub-trees which have no new files in them will not be
written. So if you only modified a couple of files since the last
backup, there won't be 50K of structure-overhead.
You can specify compression (-c) in the backup. All files are
compressed (there must be enough RAM to hold the largest file in
its compressed state). Those files which would turn out larger after
compression than before are NOT compressed. Certain file suffixes
cause the compression attempt to be skipped entire: .Z, .ARC, and .ZOO
files
IT IS SUGGESTED YOU USE THE COMPRESSION FEATURE EVEN THOUGH IT
SLOWS DOWN THE BACKUP. The resulting backup file will be
significantly reduced in size. Even though a full backup will
take a long time, you only do that every once in a while and
as incremental backups are shorter, they take much less time.
'Pick' patterns are supported (backup only paths which match the
specified patterns), and 'Discard' patterns are supported (do not backup
paths which match the specified patterns). Discard patterns override
Pick patterns.
(3)
OPTIONS
Here is a list of Backup/Restore options.
-0 (Restore) Causes all files to be restore to the current
directory (or -odirectory) rather than breaking them out
into a directory tree.
-A ARCHIVE.
(Backup) Causes the archive bit to be set on files
being backed up.
(Restore): If specified, the archive bit is cleared on
restored files. Otherwise the archive bit will be set,
causing the files to be backed up again on the next
incremental backup.
-U UPDATE. (Backup) Restricts the backup to only those files
which do not have the archive bit set. Additionaly, the
structure of empty directory trees is not saved.
-b BACKUP (this is the default if the first character in
the executable is a 'b')
-r RESTORE (this is the default if the first character in
the executable is an 'r')
-a APPEND (Backup) Cause the backup to be appended to
the specified (-o) file rather than overwriting it. Useful
for incremental backups.
-c COMPRESS (Backup) Cause all files to be compressed, if
possible. Restore automatically decompresses files which
have been compressed. This is the same algorithm used
in the UNIX compress command.
NO COMPRESSION WILL EVEN BE ATTEMPED ON FILES WITH THE
FOLLOWING SUFFIXES: .Z .ARC .ZOO
-Cpat Add the pattern to the list of patterns that are assumed
to be compressed already (so we don't waste time trying to
compress them if the -c option has been given
-f[#kb] Turn on backup fragmentation and specify the fragment size,
default 800K (for backing up to floppies). NOTE: Currently,
files larger than the fragment size cannot be backed up!
Note: a suffix is added to the file name w/ a sequence
number, but each fragment is a complete backup file unto
itself and may be restored out of order.
Any numerical value specified is in K, i.e. -f800 == 800K
Note: prompting is enabled when one or more -F options
are given. -f does not automatically enable prompting.
-Fvol: Add the volume (df0:, df1:, etc..) to the drive sequencing
list. The idea is to specify several -F options which are
cycled through and prefix each fragment. This also
enables prompting... the program prompts whenever it
switches to the next fragment.
If -F is not specified at all and -f is, no prompting
occurs.
-s Only display directories as we go along
-S Silent... don't display files or directories
-v Verbose... display those files which will NOT be backed
up as well as those that will.
-l/-t (both do the same thing). (Restore) LIST the archive
only, do not do an actual restore.
-T (Restore) Restore ONLY the timestamp, comment, and
protection fields. This is incredibly useful to
restore timestamp information to files that already
exist. NO files are overwritten or created on the
destination volume(s).
-n# (Backup) Sets the output buffer size, in KILOBYTES.
Default is 64.
-pPAT (Backup) Restrict the backup to files which match the
specified pattern. Up to 32 patterns may be specified.
(Restore) Extract only those files which match the
specified pattern.
NOTE: The pattern is matched with the COMPLETE PATH as
shown in the -t option. '*' and '?' wildcarding is supported
-dPAT (Backup) Do not backup files which match the specified
pattern. Up to 32 patterns may be specified.
(Restore) Do not extract files which match the specified
pattern.
NOTE: The pattern is matched with the COMPLETE PATH as
shown in the -t option. '*' and '?' wildcarding is supported.
-oFILE (Backup) Specify the OUTPUT FILE for a backup. IF NO
OUTPUT FILE IS SPECIFIED, NO OUTPUT FILE IS CREATED. I.E.
you can take a second pass just to set the archive bit.
(Restore) Specify the directory to place the restored
directory tree. (This overrides the volume the backup
was saved from). If no directory specified, the original
volume used in the backup will be restored to. If no
volume was specified in the backup but rather a relative
path was, the restore will be relative to the current
directory.
(4)
STANDARD METHOD OF BACKING UP
Note that with combinations of -o, -A, and -U, you have many choices
available to you when backing up files. For hard disks, backups are
normally done in two phases:
-Once a month do a complete backup of your hard disk
-Every day do a much smaller 'incremental' backup which backs
up only those files which have been modified/created since the
last backup.
The master backup, plus the N incremental backups together
reconstruct your disk up to the moment. After a while the
number of incremental backups will be so great (and messy),
that you will want to do another complete backup and start
again.
IN THIS WAY, the COMPRESS option can be put to good use. The
incremental backups are usually small, and can be compressed
relatively quickly. The complete backup should also be compressed
(-c in case you forgot) though this will take a much longer time...
but then again the complete backup is not done every day.
UPDATING THE ARCHIVE BIT ON THE FLY VERSES TAKING A SECOND PASS.
Updating the archive bit involves writing to the disk. For complete
safety you probably do NOT want to update the archive bit while you
are backing up the files in question. The following two-pass method
works well:
(COMPLETE BACKUP)
backup -c -d"*.o" volume: -ooutput
backup -A volume:
(INCREMENTAL BACKUP)
backup -U -c -d"*.o" volume: -ooutput
backup -A volume:
The -d option is saying "Don't backup all those object modules I left
laying around".
The first command backs up only those files which have be modified
or created but does NOT update the archive bit. The second command
updates the archive bit without doing anything else (no output file
is specified and thus none is created). The second command goes
extremely quickly since files are not actually read.
For your INCREMENTAL backups, risking modifying the archive bit while
backing the files up is feasible, Since very few files will be
backed up (comparitively):
backup -a -UA -c -d"*.o" volume: -ooutput
In this case I use the -a option (append). You might NOT want to do
this and save the incremental backups as separate files.
(5)
STANDARD METHOD OF RESTORING
Restoring a backup to the original volume: (Restore or Backup -r)
NOTE: If the -A option is specified, restored files will have
their Archive bit set. If -A is NOT specified, files will have
their archive bit cleared and will thus be re-backed up on the next
incremental backup.
NOTE: When restoring files, remember that the incremental backups
will have the newest modifications and should be specified LAST:
Restore completebkfile incr1 incr2 incr3....
Partial Restore using -p:
Restore -pstuffIWant bkfile1 bkfile2 bkfile3...
ARCHIVE LISTING:
Restore -t bkfile1 bkfile2....
NOTE: Two 'sizes' are given in the listing. The first
is the # bytes the file takes up in the archive, the
second is the actual size of the file.
(6)
FLOPICAL BACKUP AND RESTORE
There are two problems associated with floppy backup and restore:
(1) A single file on the HD may be two big for a single floppy
(2) It may take a lot of floppies to backup an HD
Additionaly, one wants the following conveniences:
(1) Be able to backup to a logical progression of (floppy) drives,
inserted blank disks in while the system is working on other
drives.
(2) Be able to restore the same way
(3) If one or more floppies is destroyed be able to restore from the
remaining floppies.
Currently, you can specify which devices to cycle through
with the -F option (-Fdf0: -Fdf1: -Fdf2:), but BACKUP will
always prompt you before continuing. Since it uses the
console device, you can specify the yes response as many
times as you have floppies in ready drives.
Currently, files larger than the specified -f size (800K
default) cannot be handled if using -f/-F ... However, by
enabling compression larger files can still fit.
Currently, the entire compressed result of a file must be
able to fit into memory during the backup.
***
BACKUP. Specify the -f option and then -Fvol: for each floppy
drive (in the order you want) to backup to. Example:
-f -Fdf0: -Fdf1:
(Also keep in mind all the options listed in sections (3), (4), & (5))
Currently, you must have PRE-FORMATTED all your backup disks since the
backup/restore works through normal files. The system will prompt for
readyness every time it completes a section.
The backup process never deletes files, only creates or overwrites
them. Thus, accidently sticking in a non-blank or incorrect backup
disk will probably result in a disk-full requester.... not Fatal, though
inconvenient.
You must still specify the -o option to name the output file, which will
be prefixed with the next -F volume in sequence and suffixed with the
sequence number. (.nn) The disk labels for your floppies may all be
the same.
EXAMPLE:
backup -c -d"*.o" -f -Fdf0: -Fdf1: -Fdf2: volume: -oxxbak
backup -A volume:
NOTE: You do NOT specifiy a volume prefix in the -o option ..
those specified by -F are automatically cycled through as the
prefix.
* If your hard disk has enough space on it I suggest you backup to an
alternate partition using only -f (not -F which forces user prompts),
then copy the chunks to floppies after the entire backup has
completed.
***
RESTORE. Restore works the same way. EACH DISK IS INDEPENDANT! You
may insert disks in any order to be restored. Simply execute the
standard restore command in section (5) for each floppy.
Destroyed disks may be skipped. Currently, no support for partially
restored disks exists... i.e. the archive has to be clean.
V2.03:
Restore: a file named the same as its parent directory didn't
get restored if restore had to create that parent
directory. i.e. ram:etc/etc (the last etc being a file
name) would not get restored.
Restore now properly restores things into the directory
specified by the -o option. Before it would only do
that if a volume (blah:) was specified as the first
path segment.
Restore now creates the directory specified by -o if
it does not already exist. Also, lines like this:
restore -oblah relative_path
would fail w/ restore not being able to find the
relative path (it had already cd'd somewhere else).
Backup: Empty directory trees are now saved. Before backup
would not save them. However, if -U is specified
empty directory trees are not saved. (i.e. the master
backup has the whole directory structure while
incremental backups have only the structure pertaining
to newly saved files).
-Cpat New option, add pattern to list of patterns that will
no be compressed if -c is given.
-0 (Restore): Causes all files to be restored to the
current (or -o) directory.
V2.02:
More minor bug fixes
V2.01:
Fixed bugs in restore (did not restore files into the proper
directories), and in backup (-a append flag did not work)
V2.00:
First release of V2